package com.lara1;

import java.util.LinkedList;

class Queue{
	private LinkedList list=new LinkedList<>();
	public void add(Object obj){
		list.add(obj);
	}
	public Object processElement(){
		return list.removeFirst();
	}
	public String toString(){
		return list.toString();
	}
}
public class Manager6 {
public static void main(String[] args) {
	Queue q=new Queue();
	q.add("abc");
	q.add("xyz");
	q.add("hello");
	q.add(3434);
	q.add("done");
	System.out.println(q);
	Object obj2=q.processElement();
	System.out.println(obj2);
	System.out.println(q);
}
}
